<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page import="java.util.*" %> 
<%@ page import="model.*" %>     
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-CN">
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
  
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="">

    <title>管理员页面</title>
    <!-- 引入bootstrap -->
    <link href="./css/bootstrap.min.css" rel="stylesheet">

 
</head>
<body>
<nav class="navbar navbar-default">
  <a class="navbar-brand" href="#">库存系统--管理员</a>
  <div class="container">
  	<ul class="nav navbar-nav">
   		<li><a href="./JinhuoshenheController">进货审批</a></li>
   		<li><a href="./ChuhuoshenheController">出货审批</a></li>
   		<li><a href="./ExitController">退出</a></li>
   	</ul>
  </div>
</nav>
<div style="width:600px;margin: 0 auto">
	<table class="table">
		<thead>
			<td>进货ID</td>
			<td>进货编码</td>
			<td>数量</td>
			<td>状态</td>
			<td>操作人</td>
			<td>操作时间</td>
			<td>产品ID</td>
			<td>操作</td>
		</thead>
		<%
			List<Stock> stockList = (List<Stock>)request.getAttribute("stockList");
			for(Stock stock : stockList){
				%>
				<tr>
				<td><%=stock.getStockId() %></td>
				<td><%=stock.getStockCode() %></td>
				<td><%=stock.getQuantity() %></td>
				<td><%=stock.getStatus() %></td>
				<td><%=stock.getCreator() %></td>
				<td><%=stock.getTs() %></td>
				<td><%=stock.getProductId() %></td>
				<td>
					<a href="./ValidController?stockId=<%=stock.getStockId()%>&productId=<%=stock.getProductId() %>&quantity=<%=stock.getQuantity() %>">生效</a>
					<a href="./DropController?stockId=<%=stock.getStockId()%>&productId=<%=stock.getProductId() %>&quantity=<%=stock.getQuantity() %>">作废</a>
				</td>
				</tr>
				<%
			}
		%>
	</table>
</div>
</body>
</html>